function myReject(reason) {
    if (reason instanceof Promise) {
        return reason
    }
    if (reason && typeof reason.then === 'function') {
        return new Promise((resolve, reject) => {
            reason.then(resolve,reject)
        })
    }
    return new Promise((_, rejected) => {
        rejected(reason)
    })
}
